<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Grom Hellscream
 * Date: 10/28/12
 * Time: 9:23 AM
 * To change this template use File | Settings | File Templates.
 */

// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$lanhdaos = $this->get('lanhdaos');
?>
<div id="crumbs">
    <div style="color: #222222;font-weight: normal;margin: 0;padding: 0">
        <a href="<?php echo JRoute::_('index.php?option=com_vast&view=vast') ?>">Trang chủ</a> »
        <span>Các cán bộ lãnh đạo của viện</span>
    </div>
</div>

<div id="main" class="home">
    <h3 class="title green">Lãnh đạo của viện khoa học &amp; công nghệ Việt Nam qua các thời kỳ</h3>
    <div id="carousel-widget-wpzoom-widget-3-id" class="jcarousel wpzoomWidget jcarousel-container jcarousel-container-horizontal" style="position: relative; display: block;">
        <div class="jcarousel-clip jcarousel-clip-horizontal" style="overflow: hidden; position: relative;">
            <?php if (count($lanhdaos) > 0): ?>
            <?php $i = 1; ?>
            <ul class="jcarousel-list jcarousel-list-horizontal" style="overflow: hidden; position: relative; top: 0px; left: -2860px; margin: 0px; padding: 0px; width: 3528px;">    
                <?php foreach ($lanhdaos as $lanhdao): ?>
                <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-1 jcarousel-item-1-horizontal" style="float: left; list-style: none outside none;" jcarouselindex="<?php echo $i; ?>">
                    <a title="<?php echo $lanhdao->chucdanh; ?>" href="<?php echo JRoute::_('index.php?option=com_vast&view=chitietcanbo&id=' . $lanhdao->id) ?>">
                        <img class="Thumbnail thumbnail carousel " width="100" height="80" alt="Lorem ipsum dolor sit amet" src="<?= file_exists($lanhdao->anhdaidien) ? $lanhdao->anhdaidien : $this->baseurl . '/media/com_vast/images/www.vast.ac.vn.gif' ?>"/>
                    </a>
                </li>       
                <?php $i = $i + 1; ?>     
                <?php endforeach; ?>
            </ul>
            <?php endif; ?>
        </div>
        <div class="cleaner"> </div>   
        <div class="jcarousel-prev jcarousel-prev-horizontal" style="display: block;">« Trước</div>
        <div class="jcarousel-next jcarousel-next-horizontal" style="display: block;">Tiếp »</div>    
        <script type="text/javascript">
            function mycarousel_initCallback(carousel)
            {
            };
            jQuery(document).ready(function() {
            jQuery('#carousel-widget-wpzoom-widget-3-id').jcarousel({
                scroll: 1,
                wrap: 'circular',
                initCallback: mycarousel_initCallback
                });
            });
        </script>
        <div class="cleaner"> </div>    
    </div>
    <h3 class="title blue">Danh sách chi tiết các lãnh đạo của viện khoa học &amp; công nghệ Việt Nam qua các thời kỳ</h3>
    <div class="single">
        <?php if (count($lanhdaos) > 0): ?>            
            <table style="margin: 5px;">
                <?php 
                    $i = 0;
                    $n = count($lanhdaos);
                    $step = 4;
                ?>
                <?php while ($i < $n): ?>
                <tr>
                    <?php for ($j = 0;$j < $step;$j++): ?>
                    <?php $lanhdao = ($i + $j < $n ? $lanhdaos[$i + $j] : NULL); ?>
                    <?php if ($lanhdao !== NULL): ?>
                    <td style="padding: 5px; text-align: center;">
                        <img style="width: 100px; height: 80px; border: 1px solid #777777;" alt="<?php echo $lanhdao->hoten; ?>" src="<?= file_exists($lanhdao->anhdaidien) ? $lanhdao->anhdaidien : $this->baseurl . '/media/com_vast/images/www.vast.ac.vn.gif' ?>" /><br/>
                        Họ tên: <a href="<?php echo JRoute::_('index.php?option=com_vast&view=chitietcanbo&id=' . $lanhdao->id); ?>"><?php echo $lanhdao->hoten; ?></a><br/>
                        Chức danh: <?php echo $lanhdao->chucdanh; ?><br />
                        <?php if ($lanhdao->tendonvi !== NULL): ?>
                            Thuộc đơn vị: <?php echo $lanhdao->tendonvi; ?>
                        <?php else: ?>
                            Thuộc phòng: <?php echo $lanhdao->tenphong; ?>
                        <?php endif; ?>
                    </td>
                    <?php endif; ?>
                    <?php endfor; ?>
                    <?php $i = $i + $step; ?>
                </tr>
                <?php endwhile; ?>
            </table>    
        <?php endif; ?>
    </div>
</div>